/*
 * libkysdk-system's Library
 *
 * Copyright (C) 2023, KylinSoft Co., Ltd.
 *
 * This library is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Lesser General Public
 * License as published by the Free Software Foundation; either
 * version 3 of the License, or (at your option) any later version.
 *
 * This library is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this library.  If not, see <https://www.gnu.org/licenses/>.
 *
 * Authors: Yunhe Liu <liuyunhe@kylinos.cn>
 *
 */

#ifndef LIBKYUSBINFO_H
#define LIBKYUSBINFO_H

#ifdef __cplusplus
extern "C"
{
#endif

    /*
     * usb设备信息
     */
    typedef struct driver_info
    {
        char name[32];
        char type[2 + 1];
        char pid[4 + 1];
        char vid[4 + 1];
        char serialNo[32];
        char devNode[32];
    } DriverInfo, *pDriverInfo;

    /*
     * usb设备信息链表
     */
    typedef struct driver_list
    {
        struct driver_info *data;
        struct driver_list *next;
    } DriverInfoList, *pDriverInfoList;

    extern pDriverInfoList kdk_usb_get_list();

    extern void kdk_usb_free(pDriverInfoList list);

#ifdef __cplusplus
}
#endif

#endif
